package cn.wolfcode.wolf2w.controller;

import cn.wolfcode.wolf2w.util.UploadUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class UploadController {

    // 普通的图片上传
    @RequestMapping("/coverImageUpload")
    public Object coverImageUpload(MultipartFile pic){
        String upload = null;
        try {
            upload = UploadUtil.uploadAli(pic);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return upload;
    }

}
